<?php
    echo $html->css("nivo-slider.css");
    echo $html->css("style 2.css");
    echo $html->css("frontend.css");  
    echo $javascript->link("jquery.nivo.slider.pack.js");
?>

<script type="text/javascript">
	$(document).ready(function(){
		$('#box_main').append('<div id="top">Back to top</div>');
		$(window).scroll(function() {
			if($(window).scrollTop() !=0){
				$('#top').fadeIn();
			} else{
				$('#top').fadeOut();	
			}
		});	
		$('#top').click(function(){
			$('html,body').animate({scrollTop:0},500);
		});
	});
	
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
</script>

<div><br /></div>
<div class="box-main">

   <div class="box-main-left">
   		<div class="pro-content">
		     <div id="slider-wrapper">
            <div id="slider" class="nivoSlider">
                <img src="img/toystory.jpg" alt="" />
                <a href="http://dev7studios.com"><img src="img/up.jpg" alt="" title="Ảnh trong phim Up" /></a>
                <img src="img/walle.jpg" alt="" title="Người máy wall-e"/>
                <img src="img/nemo.jpg" alt="" title="#htmlcaption" />
            </div>
            <div id="htmlcaption" class="nivo-html-caption">
                <a href="#" style="color: White;">Đi tìm Nemo</a>
            </div>
        
    	</div><!--end div#slider-wrapper-->
      </div><!--end div.pro-content-->
      <div class="pro-content">
      		<div class="box-pro-highlights">
            	<div class="box-pro-highlights-header"> Sản phẩm nổi bật </div>
                <div class="content">
                    <div class="all-product">                        
					<?php foreach ($productview as $prod) : ?>
                        <div class="viewproduct">  
                            <img style="position: absolute;top:0px;left:0px;" src="/onlinemarket/img/system/hot.png"/>
                            <div style="text-align: center"><a style="font-size:1.2em;font-weight: bold;color:#363636;" href="/onlinemarket/frontends/view/<?php echo($prod['Product']['id']); ?>"><?php
                             if(strlen($prod['Product']['name']) < 15) echo($prod['Product']['name']);
                             else {
                                echo(substr($prod['Product']['name'], 0, 12).'...');
                             }
                              ?></a></div>
                            <div style="text-align: center;margin-top:5px;" ><a href="/onlinemarket/frontends/view/<?php echo($prod['Product']['id']); ?>"><img  height="128" width="132"  src="/onlinemarket/img/San_pham/<?php echo($prod['Product']['picture']); ?>"/></a></div>                                                     
                            <div class="price2">
                                <b>Giá bán:</b><b style="color:#a11818"> <?php echo(number_format($prod['Product']['price'],0,'.','.')); ?></b>
                            </div>                            
                        </div>
						<?php endforeach; ?>
                    </div>
                </div>
            </div><!--end div.box-pro-highlights-->
      </div><!--end div.pro-content-->
   </div><!--end div.box-main-left-->
<div class="box-main-right" style="margin: 0px;"></div><!--end div.box-main-right-->

</div><!--end div.box-main-->
 
 <div class="box_footer">
 
  </div><!--end div.footer-->